import java.util.Scanner;

/**
 * Created by dllo on 18/3/29.
 */
public class Test04 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个三位数");

        int num = scanner.nextInt();
        int rawNum = num;
        int num100 = num / 100;
        num %= 100;
        int num10 = num / 10;
        num %= 10;

        if (rawNum == num100 * num100 * num100 + num10 * num10 * num10 + num * num * num) {
            System.out.println("是水仙花数");
        } else {
            System.out.println("不是水仙花数");
        }
    }
}